<!-- 定位栏组件 -->
<template>
  <view class="location-bar" @tap="$emit('select')">
    <uni-icons type="location-filled" size="20" color="#00C853"></uni-icons>
    <text class="location-text">{{ location }}</text>
    <uni-icons type="arrowright" size="14" color="#666"></uni-icons>
  </view>
</template>

<script setup lang="ts">
interface Props {
  location: string;
}

defineProps<Props>();
defineEmits(['select']);
</script>

<style scoped>
.location-bar {
  display: flex;
  align-items: center;
  padding: 20rpx 30rpx;
  background-color: #fff;
  gap: 8rpx;
}

.location-text {
  flex: 1;
  font-size: 28rpx;
  color: #333;
  font-weight: 500;
}
</style>